var stockFunctions = {
  openSaveWindow : function(){
    new WindowPanel({
      id: 'saveStock',
      title: '添加库存',
      width: 500,
      height: 400,
      maximizable: false,
      closeConfirm : true,
      html : '<iframe name="stockSaveFrame" id="stockSaveFrame" src="'
    	  +projectName+'/product/stock/toSave.t4m?'+getFlushParam('saveStock')
    	  +'" frameborder="0" scrolling="auto"></iframe>',
      tbar: new Toolbar({
        icon: 'image/op.gif',
        items : [{
          type : 'button',
          text : '保存',
          position: {
            a: '-80px 0px',
            b: '-80px -120px'
          },
          handler : function(){
        	  submitFrameForm('stockSaveFrame', 'stockForm');
          }
        }]
      })
    });
  },
  openUpdateWindow : function(id){
    new WindowPanel({
      id : 'updateStock',
      title : '修改库存',
      width: 323,
      height: 145,
      closeConfirm : true,
      html : '<iframe name="stockUpdateFrame" id="stockUpdateFrame" src="'
    	  +projectName+'/product/stock/toUpdate.t4m?'+getFlushParam('updateStock')
    	  +'&object.id='+ id +'" frameborder="0" scrolling="auto"></iframe>',
      tbar : new Toolbar({
        icon: 'image/op.gif',
        items : [{
          type : 'button',
          text : '修改',
          position: {
            a: '-80px 0px',
            b: '-80px -120px'
          },
          handler : function(){
        	  submitFrameForm('stockUpdateFrame', 'stockForm');
          }
        }]
      })
    });
  }
};